<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>修改密码</title>
		<meta name="format-detection" content="telephone=no,email=no"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
		<link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
		<link href="__PUBLIC__/Home/css/page.css" rel="stylesheet">
	</head>
	<style type="text/css">
		body {
			-moz-user-select: none;
			-webkit-user-select: none;
			-ms-user-select: none;
			-khtml-user-select: none;
			-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
			overflow-y: scroll;
		}
		.facesj{
			display: inline-block;
			background-color: #1fa1dc;
			width: 60px;
		    height: 32px;
		    line-height: 32px;
		    border-radius: 3px;
		    text-align: center;
		    font-size: 14px;
		    margin-top:6px;
		    border: 1px solid #1fa1dc;
		    color: #FFF;
		    margin-left:10px;
		}
		.alipay_choose,.bank_choose{display: none}
		.loginscreen{padding:40px 20px;}
		.header .ptitle{height:45px;line-height: 45px}
	</style>
	<body>
		<div class="header">
		  <div class="all_w ">
		    <div class="gofh"> <a href="javascript:history.back()"><img src="/Public/Home/img/jt_03.jpg"></a> </div>
		    <div class="ptitle">
		      修改密码
		        <a href="/" class="backgame">返回游戏</a>
		    </div>
		  </div>
		</div>
		<div class=" text-center loginscreen  animated fadeInDown">
			<div>
				<form class="m-t form-horizontal " role="form" method="post" action="{:U('Home/User/dopwd')}" id="LoginForm">
				
				<div class="form-group">
					<label class="col-sm-2 control-label" style="width:30%;text-align: right;">原密码：</label>
					<div class="col-sm-6" style="width:60%;display: inline-block;">
						<input type="text" id="old_pwd" name="old_pwd" class="form-control"  >
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" style="width:30%;text-align: right;">新密码：</label>
					<div class="col-sm-6" style="width:60%;display: inline-block;">
						<input type="text" id="pwd" name="pwd" class="form-control">
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" style="width:30%;text-align: right;">重新输入新密码：</label>
					<div class="col-sm-6" style="width:60%;display: inline-block;">
						<input type="text" id="re_pwd" name="re_pwd" class="form-control"  >
					</div>
				</div>

				<input type="hidden" name="uid" value="{$userinfo.id}">
				<button type="submit" class="btn btn-success block full-width m-b">确定</button>
			</form>
			</div>
		</div>

		<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
		<script src="__PUBLIC__/Admin/js/bootstrap.min.js?v=3.3.6"></script>
		
		<script src="__PUBLIC__/Common/js/ajaxForm.js"></script>
		<script src="__PUBLIC__/layer/layer.js"></script>
		<script type="text/javascript">
		
			$(function(){
				$('#LoginForm').ajaxForm({
					beforeSubmit: checkForm,
					success: complete, 
					dataType: 'json'
				});
				function checkForm(){
					if ($("#pwd").val() != $("#re_pwd").val()) {
						layer.alert('两次输入的密码不相同', {icon: 5}, function(index){
			 			layer.close(index);
						$('#money').focus(); 
						});
						return false;
					}
				}
				function complete(data){
					if(data.status==1){
						$('.btn').attr('disabled','disabled');
						layer.msg(data.info, function(index){
			 				layer.close(index);
							window.location.href=data.url;
						});
					}else{
						layer.msg(data.info);
						$('#password').val('').focus();
						return false;	
					}
				}
			});
		</script>
		</script>
	</body>

</html>